fix(schema): refresh strict output schema#14
Merged
kunchenguid merged 1 commit intomainfrom Apr 2, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This change tightens the agent output contract and keeps persisted run schemas up to date. It makes the shared JSON schema reject unexpected fields and rewrites the per-run
output-schema.jsonwhenever a run is resumed, so file-based agents do not keep using an older schema.Risk Assessment: 🟢 Low — Small, well-covered schema enforcement change with no negative test or review signals.
Architecture
flowchart TD subgraph schema_def["Schema Definition"] direction TB agent_schema["AGENT_OUTPUT_SCHEMA (updated)"] run_setup["setupRun (updated)"] run_resume["resumeRun (updated)"] schema_file["Run Schema File (updated)"] agent_schema -->|"serialized by"| run_setup agent_schema -->|"serialized by"| run_resume run_setup -->|"writes for new runs"| schema_file run_resume -->|"refreshes on resume"| schema_file end subgraph agent_integration["Agent Integration"] direction TB claude_agent["ClaudeAgent (unchanged)"] opencode_agent["OpenCodeAgent (unchanged)"] codex_agent["CodexAgent (unchanged)"] rovodev_agent["RovoDevAgent (unchanged)"] agent_schema -->|"passed as inline schema"| claude_agent agent_schema -->|"embedded in prompt format"| opencode_agent schema_file -->|"used via --output-schema"| codex_agent schema_file -->|"read for inline system prompt"| rovodev_agent endKey changes made
additionalProperties: falsetoAGENT_OUTPUT_SCHEMA, requiring agent output to match only the expected fields.writeSchemaFile()and reused it from bothsetupRun()andresumeRun().runtests to verify strict schema generation during setup and schema refresh during resume.How was this tested
npm test(vitest run): 21 test files, 191 tests passed.